package com.example.hello.controller;

import com.example.hello.bean.User2;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class TestController {
    @GetMapping("/test1")
    public String test1(){
        User2 user2=new User2(100,"dingsaad");
        return user2.getName();
    }
    @GetMapping("/test2")
    public String test2(){
        return "admin.index";
    }
    @PostMapping("/testlogin")
    public String testlogin(){
        return "1123";
    }
}
